package com.esri.core.tasks.na;

/* loaded from: classes.dex */
public enum AttributeUnits {
    UNKNOWN("esriUnknownUnits"),
    FEET("esriNAUFeet"),
    MILES("esriNAUMiles"),
    METERS("esriNAUMeters"),
    KILOMETERS("esriNAUKilometers"),
    NAUTICAL_MILES("esriNAUNauticalMiles"),
    DECIMAL_DEGREES("esriNAUDecimalDegrees"),
    MINUTES("esriNAUMinutes"),
    HOURS("esriNAUHours"),
    SECONDS("esriNAUSeconds"),
    DAYS("esriNAUDays"),
    INCHES("esriNAUInches"),
    MILLIMETERS("esriNAUMillimeters"),
    CENTIMETERS("esriNAUCentimeters"),
    DECIMETERS("esriNAUDecimeters"),
    YARDS("esriNAUYards");
    
    private String mType;

    AttributeUnits(String str) {
        this.mType = str;
    }

    public static AttributeUnits fromString(String str) {
        AttributeUnits[] values;
        for (AttributeUnits attributeUnits : values()) {
            if (attributeUnits.mType.equals(str)) {
                return attributeUnits;
            }
        }
        return UNKNOWN;
    }

    static AttributeUnits fromInteger(int i) {
        AttributeUnits[] values = values();
        if (i < 0 || i >= values.length) {
            return null;
        }
        return values[i];
    }

    static boolean isLengthUnit(AttributeUnits attributeUnits) {
        return (attributeUnits == UNKNOWN || isTimeUnit(attributeUnits)) ? false : true;
    }

    static boolean isTimeUnit(AttributeUnits attributeUnits) {
        return attributeUnits == HOURS || attributeUnits == MINUTES || attributeUnits == SECONDS || attributeUnits == DAYS;
    }
}
